package com.example.mall.service.impl;

import com.example.mall.mapper.EchartsMapper;
import com.example.mall.pojo.Report;
import com.example.mall.service.EchartsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@AllArgsConstructor
public class EchartsServiceImpl implements EchartsService {

    @Resource
    EchartsMapper echartsMapper;

    //获取地区
    @Override
    public List<Report> getArea() {
        return echartsMapper.getArea();
    }

    @Override
    public List<Integer> getData(String name) {
        List<Integer> integers = echartsMapper.selectUserCount(name);
        return  integers;
    }

    @Override
    public List<Report> getDate() {
        return echartsMapper.getDate();
    }


//
//    @Override
//    public List<XAxis> getDate() {
//        return echartsMapper.getDate();
//    }
//
//    @Override
//    public List<Series> getCountData() {
//        return echartsMapper.getCountData();
//    }
//
//    @Override
//    public List<Report1> getArea1() {
//        return echartsMapper.getArea1();
//    }

//    @Override
//    public List<Report1> getDate1() {
//        return echartsMapper.getDate1();
//    }
//
//    @Override
//    public List<Report1> getCountData1() {
//        return echartsMapper.getCountData1();
//    }

}
